<?php

namespace App\Models\Library;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Inci extends Model
{
    use HasFactory;

    protected $table = "incis";
    protected $primaryKey = "id";

    protected $fillable = [
        'id',
        'sn',
        'name_zh',
        'name_en',
        'cas',
        'safe_level',
        'ec',
        'effects',
        'fxwz',
        'jywz',
        'data',
        'pgjl',
        'memo',
        'status',
        'reason',
    ];

    public function usedMaterials()
    {
        return $this->hasMany(UsedMaterials::class, 'lin', 'id');
    }
}
